

<template>
  <div class="ma-content-block  justify-between p-4">
    <ma-form
        ref="formRef2"
        v-model="form"
        :columns="columns"
        class="mt-7"
        @submit="submit2"
    ></ma-form>
  </div>
</template>
<script setup>
import { ref, reactive } from 'vue'
import { Message } from '@arco-design/web-vue'
import tool from '@/utils/tool'
const form = ref({europe_ranking_limit:0})
const columns = reactive([
  {
    title: "标题",
    dataIndex: "title",
    width:280,
    formType: "input",
    editDisplay: false,
    hide:true
  },
  {
    title: "图片标题",
    dataIndex: "img_title",
    formType: "upload",
    onlyData: true,
    returnType: "url",
    multiple: false,
    chunk: false,
    type: "image",
    hide:true
  },
  {
    title: '子标题',
    dataIndex: 'sub_title',
    formType:'input',

  },
  {
    title: "摘要",
    dataIndex: "summary",
    formType: "textarea",
    hide: true
  },
  {
    title: "缩略图",
    dataIndex: "thumb",
    formType: "upload",
    onlyData: true,
    returnType: "url",
    multiple: false,
    chunk: false,
    type: "image"
  },
  {
    title: '小图一',
    dataIndex: 'one_img',
    formType: 'children-form',
    type: 'table',
    formList: [
      {
        dataIndex: 'img', title: '标签',  formType: "upload",
        onlyData: true,
        returnType: "url",
        multiple: false,
        chunk: false,
        type: "image"
      },
      {
        dataIndex: 'title', title: '标题', formType: 'input',
      },
      {
        dataIndex: 'sub_title', title: '英文名', formType: 'input',
      }
      ,
      {
        dataIndex: 'summary', title: '摘要', formType: 'textarea',
      }
    ],
    hide: true
  },

  {
    title: '第一区块头',
    dataIndex: 'one_header',
    formType: 'children-form',
    type: 'table',
    formList: [
      {
        dataIndex: 'title', title: '标题', formType: 'input',
      },
      {
        dataIndex: 'sub_title', title: '子标题', formType: 'input',
      }
      ,
      {
        dataIndex: 'summary', title: '摘要', formType: 'input',
      }
    ],
    hide: true
  },

  {
    title: '第一区块',
    dataIndex: 'one_block',
    formType: 'children-form',
    type: 'table',
    formList: [
      {
        dataIndex: 'img', title: '图片',  formType: "upload",
        onlyData: true,
        returnType: "url",
        multiple: false,
        chunk: false,
        type: "image"
      },
      {
        dataIndex: 'title', title: '标题', formType: 'input',
      }
    ],
    hide: true
  },
  {
    title: '二区块头',
    dataIndex: 'two_header',
    formType: 'children-form',
    type: 'table',
    formList: [
      {
        dataIndex: 'title', title: '标题', formType: 'input',
      },
      {
        dataIndex: 'sub_title', title: '子标题', formType: 'input',
      }
      ,
      {
        dataIndex: 'summary', title: '摘要', formType: 'input',
      }
    ],
    hide: true
  },
  {
    title: '每二区块',
    dataIndex: 'two_body',
    formType: 'children-form',
    type: 'table',
    formList: [
      {
        dataIndex: 'img', title: '图片',  formType: "upload",
        onlyData: true,
        returnType: "url",
        multiple: false,
        chunk: false,
        type: "image"
      },
      {
        dataIndex: 'title_type', title: '标题类型', formType: 'select',
        dict: { data: [{ label: '图片', value: 2 }, { label: '文字', value: 1 }], translation: true },

        addDefaultValue: '1',
      },
      {
        dataIndex: 'two_title', title: '标题', formType: 'input',
      },
      {
        dataIndex: 'tow_title_img', title: '图片标题',  formType: "upload",
        onlyData: true,
        returnType: "url",
        multiple: false,
        chunk: false,
        type: "image"
      }
    ],
    hide: true
  },
  {
    title: '小图二',
    dataIndex: 'two_img',
    formType: 'children-form',
    type: 'table',
    formList: [
      {
        dataIndex: 'img', title: '标签',  formType: "upload",
        onlyData: true,
        returnType: "url",
        multiple: false,
        chunk: false,
        type: "image"
      },
      {
        dataIndex: 'title', title: '标题', formType: 'input',
      },
      {
        dataIndex: 'sub_title', title: '英文名', formType: 'input',
      }
      ,
      {
        dataIndex: 'summary', title: '摘要', formType: 'textarea',
      }
    ],
    hide: true
  },
]);
</script>
<style scoped>

</style>